'use strict';

const Controller = require('egg').Controller;

class SwitchController extends Controller {
  async index() {
    const { ctx } = this;
    var db = this.app.mongodb;
    var res = await db.collection('switchs').find().toArray();
    await ctx.render('switch',{res})
  }
}

module.exports = SwitchController;